import request from '@/utils/request'

// 获取高级查询数据源字典
export function getAdvanceDict(code, param) {
  return request({
    url: `/deal/dealList/dict/${code}/${param || ''}`,
    method: 'get'
  })
}

// 获取分组类型
export function getGroupField() {
  return request({
    url: `/deal/dealList/queryGroupField`,
    method: 'get'
  })
}

// 获取分组数据列表
export function getGroupValue(dealType, groupType, viewId, query) {
  return request({
    url: `/deal/dealList/plain/getGroupFieldValue/${dealType}/${groupType}/${viewId}`,
    method: 'post',
    data: query
  })
}

// 获取标签分组数据列表
export function getTagGroupValue(dealType, viewId) {
  return request({
    url: `/deal/dealList/tag/getGroupFieldValue/${dealType}/${viewId}`,
    method: 'get'
  })
}

// 获取标签分组数据列表
export function getTagGroupListValue(query) {
  return request({
    url: `/deal/dealList/tag/getGroupFieldValue`,
    method: 'get',
    params: query
  })
}

// 查询默认查询视图列表
export function getDataListByView(queryData) {
  return request({
    url: '/deal/dealList/getDataListByView',
    method: 'post',
    data: queryData
  })
}

// 导出项目列表
export function exportDealBase(queryData) {
  return request({
    url: '/deal/dealList/export',
    method: 'post',
    data: queryData
  })
}

